package com.oocl.rcm;

import com.oocl.mylink.LinkedList;
import com.oocl.mylink.Node;
import com.oocl.operator.Convert;
import com.oocl.operator.ImplOperat;
import com.oocl.operator.Operat;

public class Entry {
	
	public static LinkedList list = new LinkedList();
	public static int index = 1;
	
	public static void main(String[] args) {
		System.out.println("Welcome to ITA CRM:");
		initData();
		showGuide();
		ImplOperat operat = new ImplOperat();
		list.show();
		while(true){
			operat.receiveInput();
		}
	}

	
	public static void showGuide(){
		
		System.out.println("--------------------------------------");
		System.out.println("Usage:	[Control]  [args...]:");
		System.out.println("Options:");
		System.out.println("\t" + "L  [arg]" + '\t' + "select all of member's information or someone's;");
		System.out.println("\t" + "A  [args]" + '\t' + "add a member information;");
		System.out.println("\t" + "D  [id]" + '\t' + '\t' + "delete a member information by id;");
		System.out.println("\t" + "U  [args]" + '\t' + "Update information;");
		System.out.println("\t" + "O  [arg]" + '\t' + "order all of imformation and list;");
		System.out.println("\t" + "H" + '\t' + '\t' + "display this help;");
		System.out.println("\t" + "Q" + '\t' + '\t' + "Exit the program;");
		System.out.println("---------------------------------------");
	}
	public static void initData(){
		list.add(new Node(Convert.convert("name:Matthe,sex:m,birthday:1994-01-01,address:first street,call:110")));
		list.add(new Node(Convert.convert("name:Cheers,sex:m,birthday:1994-02-01,address:second street,call:120")));
		list.add(new Node(Convert.convert("name:Harry,sex:m,birthday:1994-02-01,address:third street,call:119")));
		list.add(new Node(Convert.convert("name:Marvin,sex:m,birthday:1994-04-01,address:forth street,call:911")));
		list.add(new Node(Convert.convert("name:Mike,sex:m,birthday:1994-05-01,address:fifth street,call:114")));
		list.add(new Node(Convert.convert("name:Wyatt,sex:m,birthday:1994-06-01,address:sixth street,call:165")));
		list.add(new Node(Convert.convert("name:Carmen,sex:f,birthday:1994-07-01,address:first street,call:180")));
		list.add(new Node(Convert.convert("name:Kelvin,sex:m,birthday:1994-08-01,address:second street,call:186")));
		list.add(new Node(Convert.convert("name:Garen,sex:m,birthday:1994-09-01,address:fifth street,call:136")));
		list.add(new Node(Convert.convert("name:Evan,sex:m,birthday:1994-10-01,address:second street,call:156")));
	}
	public static void showError(){
		System.out.println("input invalid!");
	}
	
	public void showSuccess(){
		System.out.println("Operation is Success!");
	}
	
//	public static void showResult(){
//		
//	}
}
